From: Carlos Garnacho Date: Wed, 17 Nov 2021 23:41:20 +0000 (+0100) Subject: dnd: Use Clutter.grab() for DnD grab X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~530^2^2~186 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=5305bee94c41195c7411f7997de76fdd7678c673;p=gnome-shell.git dnd: Use Clutter.grab() for DnD grab We still listen to an specific device or touch sequence, but we don't grab it specifically. Part-of: --- diff --git a/js/ui/dnd.js b/js/ui/dnd.js index cefde6f60..f6324f14e 100644 --- a/js/ui/dnd.js +++ b/js/ui/dnd.js @@ -165,11 +165,7 @@ var _Draggable = class _Draggable { } _grabDevice(actor, pointer, touchSequence) { - if (touchSequence) - pointer.sequence_grab(touchSequence, actor); - else if (pointer) - pointer.grab(actor); - + this._grab = global.stage.grab(actor); this._grabbedDevice = pointer; this._touchSequence = touchSequence; @@ -188,11 +184,10 @@ var _Draggable = class _Draggable { this._capturedEventId = 0; } - if (this._touchSequence) - this._grabbedDevice.sequence_ungrab(this._touchSequence); - else - this._grabbedDevice.ungrab(); - + if (this._grab) { + this._grab.dismiss(); + this._grab = null; + } this._touchSequence = null; this._grabbedDevice = null; }